package com.buaa.example.controller;

import com.buaa.example.entity.Xxx;
import com.buaa.example.service.IXxxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 测试用Controller类
 *
 * @author xuyang
 * @date 2025/4/8 22:30
 */
@Controller
@RequestMapping("/example/xxx")
public class XxxController {

    @Autowired
    private IXxxService xxxService;

    /**
     * 获取未分页的数据列表
     *
     * @return 数据列表
     */
    @GetMapping("/list")
    @ResponseBody
    public List<Xxx> listWithoutPage(){
        return xxxService.list();
    }

}
